
    <dl style="overflow: visible;">
        <dt><?php echo $lang['store_goods_index_goods_brand'] . $lang['nc_colon']; ?></dt>
        <dd>
            <div class="ncsc-brand-select">
                <div class="selection">
                    <input name="b_name" id="b_name" value="<?php echo $output['goods']['brand_name']; ?>" type="text"
                           class="text w180" readonly="readonly"/>
                    <input type="hidden" name="b_id" id="b_id" value="<?php echo $output['goods']['brand_id']; ?>"/>
                    <em class="add-on"><i class="icon-collapse"></i></em></div>
                <div class="ncsc-brand-select-container">
                    <div class="brand-index" data-tid="<?php echo $output['goods_class']['type_id']; ?>"
                         data-url="<?php echo urlShop('store_goods_add', 'ajax_get_brand'); ?>">
                        <div class="letter" nctype="letter">
                            <ul>
                                <li><a href="javascript:void(0);" data-letter="all">全部品牌</a></li>
                                <li><a href="javascript:void(0);" data-letter="A">A</a></li>
                                <li><a href="javascript:void(0);" data-letter="B">B</a></li>
                                <li><a href="javascript:void(0);" data-letter="C">C</a></li>
                                <li><a href="javascript:void(0);" data-letter="D">D</a></li>
                                <li><a href="javascript:void(0);" data-letter="E">E</a></li>
                                <li><a href="javascript:void(0);" data-letter="F">F</a></li>
                                <li><a href="javascript:void(0);" data-letter="G">G</a></li>
                                <li><a href="javascript:void(0);" data-letter="H">H</a></li>
                                <li><a href="javascript:void(0);" data-letter="I">I</a></li>
                                <li><a href="javascript:void(0);" data-letter="J">J</a></li>
                                <li><a href="javascript:void(0);" data-letter="K">K</a></li>
                                <li><a href="javascript:void(0);" data-letter="L">L</a></li>
                                <li><a href="javascript:void(0);" data-letter="M">M</a></li>
                                <li><a href="javascript:void(0);" data-letter="N">N</a></li>
                                <li><a href="javascript:void(0);" data-letter="O">O</a></li>
                                <li><a href="javascript:void(0);" data-letter="P">P</a></li>
                                <li><a href="javascript:void(0);" data-letter="Q">Q</a></li>
                                <li><a href="javascript:void(0);" data-letter="R">R</a></li>
                                <li><a href="javascript:void(0);" data-letter="S">S</a></li>
                                <li><a href="javascript:void(0);" data-letter="T">T</a></li>
                                <li><a href="javascript:void(0);" data-letter="U">U</a></li>
                                <li><a href="javascript:void(0);" data-letter="V">V</a></li>
                                <li><a href="javascript:void(0);" data-letter="W">W</a></li>
                                <li><a href="javascript:void(0);" data-letter="X">X</a></li>
                                <li><a href="javascript:void(0);" data-letter="Y">Y</a></li>
                                <li><a href="javascript:void(0);" data-letter="Z">Z</a></li>
                                <li><a href="javascript:void(0);" data-letter="0-9">其他</a></li>
                            </ul>
                        </div>
                        <div class="search" nctype="search">
                            <input name="search_brand_keyword" id="search_brand_keyword" type="text" class="text"
                                   placeholder="品牌名称关键字查找"/><a href="javascript:void(0);" class="ncsc-btn-mini"
                                                               style="vertical-align: top;">Go</a></div>
                    </div>
                    <div class="brand-list" nctype="brandList">
                        <ul nctype="brand_list">
                            <?php if (is_array($output['brand_list']) && !empty($output['brand_list'])) { ?>
                                <?php foreach ($output['brand_list'] as $val) { ?>
                                    <li data-id='<?php echo $val['brand_id']; ?>'
                                        data-name='<?php echo $val['brand_name']; ?>'>
                                        <em><?php echo $val['brand_initial']; ?></em><?php echo $val['brand_name']; ?>
                                    </li>
                                <?php } ?>
                            <?php } ?>
                        </ul>
                    </div>
                    <div class="no-result" nctype="noBrandList" style="display: none;">没有符合"<strong>搜索关键字</strong>"条件的品牌
                    </div>
                </div>
            </div>
        </dd>
    </dl>



<?php if (is_array($output['attr_list']) && !empty($output['attr_list'])) { ?>
    <dl>
        <dt><?php echo $lang['store_goods_index_goods_attr'] . $lang['nc_colon']; ?></dt>
        <dd>
            <?php foreach ($output['attr_list'] as $k => $val) { ?>
                <span class="mr30">
          <label class="mr5"><?php echo $val['attr_name'] ?></label>
          <input type="hidden" name="attr[<?php echo $k; ?>][name]" value="<?php echo $val['attr_name'] ?>"/>
                    <?php if (is_array($val) && !empty($val)) { ?>
                        <select name="" attr="attr[<?php echo $k; ?>][__NC__]" nc_type="attr_select">
                            <option value='不限' nc_type='0'>不限</option>
                            <?php foreach ($val['value'] as $v) { ?>
                                <option value="<?php echo $v['attr_value_name'] ?>"
                                        <?php if (isset($output['attr_checked']) && in_array($v['attr_value_id'], $output['attr_checked'])){ ?>selected="selected"<?php } ?>
                                        nc_type="<?php echo $v['attr_value_id']; ?>"><?php echo $v['attr_value_name']; ?></option>
                            <?php } ?>
                        </select>
                    <?php } ?>
          </span>
            <?php } ?>
        </dd>
    </dl>
<?php } ?>

<?php
    if (!empty($_GET['commonid'])) {
        ?>
        <dl>
            <dt>规格名称：</dt>
            <dd>
                <input type="spec_name" value="<?php echo $goods_info['spec_name'] ?>" class='text valid'>
            </dd>
        </dl>
    <?php } ?>
<dl>
    <dt>
        <?php
            if (empty($_GET['commonid'])) {
                echo "商品规格：";
            } else {
                echo "商品关联：";
            }
        ?>

    </dt>
    <dd>
        <?php
            if (!empty($_GET['commonid'])) {
                $ginfo = Model()->table("goods")->where(array('goods_commonid' => $_GET['commonid']))->find();
                $gcinfo = Model()->table('goods_common')->find($_GET['commonid']);
                $specs = explode(',', $ginfo['link_goods']);
                $guige = array();
                foreach ($specs as $spec) {
                    $_ginfo = Model()->table('goods')->where(array('goods_id' => $spec))->find();
                    $guige[] = $_ginfo['goods_serial'];
                }
                $guige = implode("\r\n", $guige);
            } else {
                $guige = '';
            }
        ?>
        <textarea name="goods_new_spec" id="" cols="30" rows="10"
                  style="width:80%;min-height:200px;line-height: 25px;"><?php echo $guige; ?></textarea>
        <?php if (empty($_GET['commonid'])) { ?>
            <p class="hint">
                请输入规格名称，系统将会自动生成相应的条目，并将规格补充到商品名称中，具体内容请自行编辑
                <br>
                规格名称一行为一个
                <br>
                格式为“补充名称 补充货号”，例如“红色 red-1”
                <br>
                此处填写时，商品货号以当前为准
            </p>
        <?php } else { ?>

            <p class="hint">
                此处填写相关联的规格货号，在商品详情页会有跳转的链接，每行为一个货号，可任意连接
            </p>

        <?php } ?>

    </dd>
</dl>

<dl>
    <dt><?php echo $lang['store_goods_index_goods_desc'] . $lang['nc_colon']; ?></dt>
    <dd id="ncProductDetails">
        <div id="panel-1" class="ui-tabs-panel" jquery1239647486215="4">
            <?php showEditor('g_body', $output['goods']['goods_body'], '100%', '480px', 'visibility:hidden;', "false", $output['editor_multimedia']); ?>
            <div class="hr8">
                <div class="ncsc-upload-btn"><a href="javascript:void(0);"><span>
                  <input type="file" hidefocus="true" size="1" class="input-file" name="add_album" id="add_album"
                         multiple="multiple">
                  </span>

                        <p><i class="icon-upload-alt" data_type="0" nctype="add_album_i"></i>图片上传</p>
                    </a></div>
                <a class="ncsc-btn mt5" nctype="show_desc" href="index.php?act=store_album&op=pic_list&item=des"><i
                        class="icon-picture"></i><?php echo $lang['store_goods_album_insert_users_photo']; ?></a> <a
                    href="javascript:void(0);" nctype="del_desc" class="ncsc-btn mt5" style="display: none;"><i
                        class=" icon-circle-arrow-up"></i>关闭相册</a></div>
            <p id="des_demo"></p>
        </div>
    </dd>
</dl>
<script>
$(document).on('click',"[nctype=brand_list] li",function(){
	var name = $(this).attr('data-name');
	$('[name=b_name]').attr('value',name);
});
</script>
